// component/detail/detail.js
const app=getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    // hot: {
    //   "start": 0,
    //   "count": 10,
    //   "state": "hot",
    //   "total": 0,
    //   "row": 0

    // },
    caidanlan: [
      {
        id:1,
        img:'/images/01.jpg',
        text:'隧道尽头',
        score:'9.1',
        EnglishName:'AAAA'
      },
      {
        id:2,
        img:'/images/02.jpg',
        text:'海伦娜之路',
        score:'9.2',
        EnglishName:'BBBB'
      },
      {
        id:3,
       img:'/images/03.jpg',
       text:'怪物召唤',
       score:'8.1',
       EnglishName:'CCCC'
      },
      {
        id:4,
       img:'/images/04.jpg',
       text:'阿修罗',
       score:'8.8',
       EnglishName:'DDDD'
      },
      {
        id:5,
       img:'/images/05.jpg',
       text:'类人猿行动',
       score:'6.1',
       EnglishName:'EEEE'
      },
      {
        id:6,
       img:'/images/06.jpg',
       text:'星球大战外星人',
       score:'5.1',
       EnglishName:'FFFF'
      },
      {
        id:7,
       img:'/images/07.jpg',
       text:'倒霉特工熊',
       score:'6.1',
       EnglishName:'GGGG'
      },
      {
        id:8,
       img:'/images/08.jpg',
       text:'情圣',
       score:'8.1',
       EnglishName:'HHHH'
      },
      {
        id:9,
       img:'/images/09.jpg',
       text:'太空旅客',
       score:'暂未评分',
       EnglishName:'IIII'
      },
      {
        id:10,
       img:'/images/10.jpg',
       text:'魔弦传说',
       score:'暂未评分',
       EnglishName:'JJJJ'
      },
      {
        id:11,
       img:'/images/11.jpg',
       text:'天空之眼',
       score:'暂未评分',
       EnglishName:'KKKK'
      }
     ]

  },

  /**
   * 组件的方法列表
   */
  methods: {
    detail(e){
      wx.setStorageSync('movie', this.data.caidanlan[e.currentTarget.dataset.id-1])
     wx.setStorageSync('id', this.data.caidanlan[e.currentTarget.dataset.id-1].id);
    
    wx.navigateTo({
      url: '../detailinfo/detailinfo',
    })
      // wx.navigateTo({
      //   url: '../detailinfo/detailinfo&id='+(this.data.newcaidanlan)[e.currentTaget.dataset.id-1],
      // })
      },
       onLoad(options) {
let that=this;
wx.request({
  url: app.globalData.url+'/'+this.data.hot.state,
  data:{},
  header:{},
  success(res){
    that.setData({
      hot:res.data
    })
  }
})
  },
  }
})
